DISCUSSION
The
ATSUCreateTextLayout function creates an empty text layout object that contains default text layout attributes but no style runs, soft line breaks, or associated text. The default text layout attribute values are described in
Table C-2. You can set non-default text layout attribute values by calling the function
ATSUSetLayoutControls.
To create a text layout object that contains style runs, text, and soft line breaks, call the functions
ATSUCreateTextLayoutWithTextHandle and
ATSUCreateTextLayoutWithTextPtr.
Most functions that operate on text layout objects require that they have style runs, text, and soft line breaks. To assign style runs, text, and soft line breaks to an "empty" text layout object, call the functions
ATSUSetRunStyle,
ATSUSetTextPointerLocation or
ATSUSetTextHandleLocation, and
ATSUSetSoftLineBreak or
ATSUBreakLine.
To create a copy of an existing text layout object, call the function
ATSUCreateAndCopyTextLayout.